{extend name="base" /} {block name="css"}
{/block} {block name="body"}
<style>
    .layui-layedit-iframe iframe{
        height:500px!important;
    }
    </style>
<!--tab标签-->
<div class="layui-tab-brief">

    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <form class="layui-form form-container" data-url="{:url('feelym/articles/save')}" localtion-url="{:url('articles/index')}">
                <div class="layui-row layui-col-space15 layui-form-item">
                    <div class="layui-col-md3">
                        <label class="layui-form-label">所属分类</label>
                        <div class="layui-input-block">
                            <select lay-verify="required" name="tid" lay-filter="tid"> 
                                {volist name="category_level_list" id="vo"}
                                <option value="{$vo.id}">{neq name="vo.level" value="1"}|{php}for($i=1;$i<$vo['level'];$i++){echo ' --';}{/php}{/neq}{$vo.name}</option>
                                   {/volist}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space15 layui-form-item">
                    <div class="layui-col-md3">
                        <label for="L_title" class="layui-form-label">短标题</label>
                        <div class="layui-input-block">
                            <input type="text" id="L_title" name="title" required="" lay-verify="required" autocomplete="off" class="layui-input" />
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space15 layui-form-item">
                    <div class="layui-col-md3">
                        <label for="L_title" class="layui-form-label">副标题</label>
                        <div class="layui-input-block">
                            <input type="text" id="ftitle" name="ftitle" required="" lay-verify="required" autocomplete="off" class="layui-input" />
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space15 layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">URL地址</label>
                    <div class="layui-inline" style="margin-left:0px;">
                        <input id="dddddd" name="outlink" type="text" placeholder="点击标题可直接跳转（需以http或开头）" autocomplete="off" class="layui-input" style="width: 400px;float: left;">
                        <input type="button" class="btn" id="huoqushuju" value="获取TKD" style="border-radius: 5px;margin-left: 15px;width:100px;height:36px;background:#ff5656;color:#FFF;cursor:pointer;border:0;">
                    </div>
                </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">是否跳转</label>
                    <div class="layui-input-inline">
                        <input type="radio" name="tiaozhuan" value="1" title="跳转" ><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>启用</div></div>
                        <input type="radio" name="tiaozhuan" value="0" title="不跳转" checked="checked"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>禁用</div></div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">ICO标志</label>
                    <div class="layui-input-inline">
                        <button type="button" class="layui-btn" id="ico">
                                            <i class="layui-icon">&#xe67c;</i>上传ICO
                                        </button>
                        <input type="text" id="coverico" name="coverico" placeholder="没有则为空" class="layui-input" style="position: absolute;left: 111px;top: 0px;width:400px;">

                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">首页图</label>
                    <div class="layui-input-inline">
                        <button type="button" class="layui-btn" id="image">
                                            <i class="layui-icon">&#xe67c;</i>上传图片
                                        </button>
                        <input type="text" id="coverpic" name="coverpic" placeholder="如不填可以自动获取内容中的第一张图" class="layui-input" style="position: absolute;left: 111px;top: 0px;width:400px;">

                    </div>
                    <span class="layui-form-item" style="margin-top: 20px;margin-bottom: 10px;margin-left: 350px;">
                        <span class="layui-inline">
                            <td align="center">
                                <input name="piclocal" type="checkbox" lay-filter="piclocal" value="0" title="远程图片本地化" checkbox />
                            </td>
                        </span>
                    </span>
                </div>
                    <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-upload-list">
                        <img class="layui-upload-img" id="picshow" style="max-height: 200px">
                    </div>
                </div>

          
              <div class="layui-row layui-col-space15 layui-form-item">
                <div class="layui-col-md3">
                    <label class="layui-form-label">关键字</label>
                    <div class="layui-input-block">
                        <input id="guanjianci" name="keywords" type="text" placeholder="英文逗号分隔" autocomplete="off" class="layui-input" style="width: 400px;float: left;">
                    </div>
                </div>
            </div>

            <div class="layui-row layui-col-space15 layui-form-item">
                <div class="layui-col-md3">
                    <label class="layui-form-label">网站介绍</label>
                    <div class="layui-input-block">
                        <textarea id="haha" name="content" type="text" placeholder="英文逗号分隔" autocomplete="off" class="layui-textarea" style="height:300px;width: 600px;float: left;"></textarea>
                    </div>
                </div>
            </div>
                <!-- 文章发布框 -->
                <!-- <textarea id="content" name="content" lay-verify="content" style="height:600px;width: 100%;"></textarea> -->
                {:hook('addVideo')}    
                {:hook('attachlinkadd')}

                <div class="layui-form-item">

                    <label class="layui-form-label">定时发布</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="time" id="time">
                    </div>
                </div>
                <div class="btable-paged">
                    <div class="layui-main">
                        <div class="formbtngroup">
                            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="tijiao">提交</button>
                            <button onclick="history.go(-1);return false;" class="layui-btn layui-btn-primary layui-btn-sm">返回</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript" src="__ADMIN__/js/formadd.js"></script>
<script>
    layui.use('laydate', function(){
      var laydate = layui.laydate;
      
      //执行一个laydate实例
      laydate.render({
        elem: '#time' //指定元素
        ,type: 'datetime'
        ,value: new Date()
      });
    });
    </script>
    <script>
        $('#huoqushuju').click(function(){
            var wangzhi = $('#dddddd').val();
            console.log(wangzhi);
            $.ajax({
                //请求方式
                type:"GET",
                //文件位置
                url:"https://api.mxooo.cn/bushi_api/zhuaqu/?url="+wangzhi,
                //返回数据格式为json,也可以是其他格式如
                dataType:"JSON",
                //请求成功后要执行的函数，拼接html
                success:function(data){
                console.log("成功读取数据！");
                $('#L_title').val(data.titler);
                $('#guanjianci').val(data.keywords);
                $('#haha').val(data.description);

                }
            });
        });
</script>
{/block}